﻿Jxstar.currentPage = function() {
	var config = {param:{},initpage:function(page, define){},eventcfg:{}};

	var auditData = Jxstar.findComboData('audit');
	var providertypeData = Jxstar.findComboData('providertype');
	var mgnstatusData = Jxstar.findComboData('mgnstatus');

	var cols = [
	{col:{header:'记录状态', width:75, sortable:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: auditData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: auditData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < auditData.length; i++) {
				if (auditData[i][0] == value)
					return auditData[i][1];
			}
		}}, field:{name:'provider_return__auditing',type:'string'}},
	{col:{header:'供应商编号', width:100, sortable:true}, field:{name:'provider_return__provider_code',type:'string'}},
	{col:{header:'供应商名称', width:160, sortable:true}, field:{name:'provider_return__provider_name',type:'string'}},
	{col:{header:'供应商类型', width:100, sortable:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: providertypeData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: providertypeData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < providertypeData.length; i++) {
				if (providertypeData[i][0] == value)
					return providertypeData[i][1];
			}
		}}, field:{name:'provider_return__provider_type',type:'string'}},
	{col:{header:'执照注册号', width:100, sortable:true}, field:{name:'provider_return__license_reg',type:'string'}},
	{col:{header:'管理状态', width:100, sortable:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: mgnstatusData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: mgnstatusData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < mgnstatusData.length; i++) {
				if (mgnstatusData[i][0] == value)
					return mgnstatusData[i][1];
			}
		}}, field:{name:'provider_return__manage_status',type:'string'}},
	{col:{header:'退出原因', width:200, sortable:true}, field:{name:'provider_return__return_cause',type:'string'}},
	{col:{header:'申请单号', width:100, sortable:true}, field:{name:'provider_return__return_code',type:'string'}},
	{col:{header:'申请部门', width:100, sortable:true}, field:{name:'provider_return__dept_name',type:'string'}},
	{col:{header:'申请人', width:76, sortable:true}, field:{name:'provider_return__user_name',type:'string'}},
	{col:{header:'申请时间', width:100, sortable:true, renderer:function(value) {
			return value ? value.format('Y-m-d') : '';
		}}, field:{name:'provider_return__apply_date',type:'date'}},
	{col:{header:'备注', width:100, sortable:true, hidden:true}, field:{name:'provider_return__memo',type:'string'}},
	{col:{header:'主键', width:100, sortable:true, hidden:true}, field:{name:'provider_return__return_id',type:'string'}},
	{col:{header:'部门id', width:100, sortable:true, hidden:true}, field:{name:'provider_return__dept_id',type:'string'}},
	{col:{header:'供应商id', width:100, sortable:true, hidden:true}, field:{name:'provider_return__provider_id',type:'string'}},
	{col:{header:'申请人id', width:100, sortable:true, hidden:true}, field:{name:'provider_return__user_id',type:'string'}}
	];
	
	config.param = {
		cols: cols,
		sorts: null,
		hasQuery: '1',
		isedit: '0',
		isshow: '1',
		funid: 'provider_return'
	};
	
	
		
	return new Jxstar.GridNode(config);
}